Bayeux / Faye compatibility
Bayeux is one of the few standard protocols for publish-subscribe messaging on the web. Today we announce Bayeux compatibility in the Fanout Cloud realtime push service. When you publish JSON objects through our service, they can be received by any Bayeux-compatible client library, such as Faye.
Connecting is easy. The Bayeux service lives at a base URL of the form:
Substitute {realm-id}
with your Realm ID. Alternatively, you can configure a custom domain instead. Prefix any channels with a slash (“/”) before subscribing. Here’s an example of how to listen on a Fanout Cloud channel called test
using Faye:
As an extra convenience, we host the Faye client library on our web service, which you can include:
This feature is introduced in the same spirit as we had done with XMPP publish-subscribe compatibility awhile back. Through the use of standard protocols, “lock-in” is reduced and client implementation choice expands. For example, you can use the FayeSwift client library to connect to our service. If you are ever unsatisfied with Fanout, you can migrate to your own Bayeux server without changing client code.
There are now three ways to receive JSON messages through Fanout Cloud: Bayeux, XMPP, and FPP (our home-grown protocol). You can have a mix of clients connected to the same channel using different protocols, and any JSON messages published will be delivered to all clients.
Happy pushing!
Recent posts
-
We've been acquired by Fastly
-
A cloud-native platform for push APIs
-
Vercel and WebSockets
-
Rewriting Pushpin's connection manager in Rust
-
Let's Encrypt for custom domains